package cn.tedu.hospital.inventory.server.impl;

import cn.tedu.hospital.inventory.mapper.InventoryMapper;
import cn.tedu.hospital.inventory.pojo.dto.InventoryQuery;
import cn.tedu.hospital.inventory.pojo.vo.InventoryVO;
import cn.tedu.hospital.inventory.server.InventoryService;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Select;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Slf4j
@Service
public class InventoryServiceImpl implements InventoryService {

    @Autowired
    InventoryMapper inventoryMapper;
    @Override
    public List<InventoryVO> selectInventory(InventoryQuery inventoryQuery) {
        log.debug("查询药品信息业务"+inventoryQuery);
        List<InventoryVO> list= inventoryMapper.selectInventory(inventoryQuery);
        return list;
    }

    @Override
    public void addInventory(InventoryVO inventoryVO) {
        log.debug("添加药品信息业务"+inventoryVO);
        inventoryMapper.addInventory(inventoryVO);
    }
}
